<template>
  <div>
    用户名 <van-field  v-model="username" placeholder="账号:" label="请输入账号"></van-field>
    密码<van-field  v-model="password" placeholder="密码:" label="请输入密码"></van-field>
    <van-button @click="login1">登录</van-button>
  </div>
</template>

<script>
export default {
  name: "login",
  data() {
    return {
      username: '',
      password: '',
    }
  },
  methods: {
    login1() {
      this.axios.post('/login', {'username': this.username, 'password': this.password})
          .then(res => {
            console.log(res)
          })
    }
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>
